<fieldset>
    <legend>条件搜索</legend>
    <form action="{:request()->url()}" autocomplete="off" class="layui-form layui-form-pane form-search" method="get" onsubmit="return false">
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">时间</label>
            <div class="layui-input-inline">
                <input class="layui-input" data-date-range name="date" placeholder="请选择时间" value="{:input('date', $yesterday)}">
            </div>
        </div>

        <div class="layui-form-item layui-inline">
            <button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>

            <!--{if auth("export")}-->
            <button class="layui-btn layui-btn-primary"
                    data-form-export="{:url('export')}?date={:input('date', $yesterday)}}" type="button">
                <i class="layui-icon layui-icon-export"></i> 导出未做订单
            </button>
            <!--{/if}-->
        </div>
    </form>

    <script>form.render()</script>
</fieldset>

<script>
    window.form.render();
    require(['excel'], function (excel) {
        excel.bind(function (data) {
            var items = [];

            items.push([
                '未做订单',
            ]);
            data.forEach(function (item) {
                items.push([
                    item
                ]);
            });
            return items;
        }, '未做订单-' + "{:input('date', $yesterday)}");
    });


</script>